package com.zzuli.practice.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

@Data
@TableName("orderinfo")
public class Order {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String username;

    private String address;

    private String repairman = "待分配";

    private Integer status;

    private String type;

    private Integer repairmanid;

    @TableField(exist = false)
    private String statusName;

    // 逻辑删除
    @TableLogic
    private Integer deletetype;

    public String getStatusName(){
        switch (status){
            case 0:
                this.statusName = "待处理";
                break;
            case 1:
                this.statusName = "维修中";
                break;
        }
        return this.statusName;
    }

}
